import 'package:yurun_smartmerchants/models/personinformation_response_entity.dart';

personinformationResponseEntityFromJson(PersoninformationResponseEntity data, Map<String, dynamic> json) {
	if (json['credentials'] != null) {
		data.credentials = json['credentials'];
	}
	if (json['account'] != null) {
		data.account = new PersoninformationResponseAccount().fromJson(json['account']);
	}
	if (json['consumer'] != null) {
		data.consumer = new PersoninformationResponseConsumer().fromJson(json['consumer']);
	}
	if (json['certification'] != null) {
		data.certification = new PersoninformationResponseCertification().fromJson(json['certification']);
	}
	return data;
}

Map<String, dynamic> personinformationResponseEntityToJson(PersoninformationResponseEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['credentials'] = entity.credentials;
	if (entity.account != null) {
		data['account'] = entity.account.toJson();
	}
	if (entity.consumer != null) {
		data['consumer'] = entity.consumer.toJson();
	}
	if (entity.certification != null) {
		data['certification'] = entity.certification.toJson();
	}
	return data;
}

personinformationResponseAccountFromJson(PersoninformationResponseAccount data, Map<String, dynamic> json) {
	if (json['modifiedTime'] != null) {
		data.modifiedTime = json['modifiedTime']?.toString();
	}
	if (json['salt'] != null) {
		data.salt = json['salt']?.toString();
	}
	if (json['openId'] != null) {
		data.openId = json['openId'];
	}
	if (json['consumerId'] != null) {
		data.consumerId = json['consumerId']?.toInt();
	}
	if (json['creatorId'] != null) {
		data.creatorId = json['creatorId'];
	}
	if (json['modifierId'] != null) {
		data.modifierId = json['modifierId'];
	}
	if (json['url'] != null) {
		data.url = json['url'];
	}
	if (json['password'] != null) {
		data.password = json['password']?.toString();
	}
	if (json['deleted'] != null) {
		data.deleted = json['deleted'];
	}
	if (json['owned'] != null) {
		data.owned = json['owned'];
	}
	if (json['createdTime'] != null) {
		data.createdTime = json['createdTime']?.toString();
	}
	if (json['id'] != null) {
		data.id = json['id']?.toInt();
	}
	if (json['username'] != null) {
		data.username = json['username']?.toString();
	}
	return data;
}

Map<String, dynamic> personinformationResponseAccountToJson(PersoninformationResponseAccount entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['modifiedTime'] = entity.modifiedTime;
	data['salt'] = entity.salt;
	data['openId'] = entity.openId;
	data['consumerId'] = entity.consumerId;
	data['creatorId'] = entity.creatorId;
	data['modifierId'] = entity.modifierId;
	data['url'] = entity.url;
	data['password'] = entity.password;
	data['deleted'] = entity.deleted;
	data['owned'] = entity.owned;
	data['createdTime'] = entity.createdTime;
	data['id'] = entity.id;
	data['username'] = entity.username;
	return data;
}

personinformationResponseConsumerFromJson(PersoninformationResponseConsumer data, Map<String, dynamic> json) {
	if (json['modifiedTime'] != null) {
		data.modifiedTime = json['modifiedTime']?.toString();
	}
	if (json['creatorId'] != null) {
		data.creatorId = json['creatorId'];
	}
	if (json['modifierId'] != null) {
		data.modifierId = json['modifierId'];
	}
	if (json['remark'] != null) {
		data.remark = json['remark'];
	}
	if (json['type'] != null) {
		data.type = json['type'];
	}
	if (json['filedDate'] != null) {
		data.filedDate = json['filedDate']?.toString();
	}
	if (json['marketId'] != null) {
		data.marketId = json['marketId'];
	}
	if (json['number'] != null) {
		data.number = json['number']?.toString();
	}
	if (json['filedMarketName'] != null) {
		data.filedMarketName = json['filedMarketName']?.toString();
	}
	if (json['businessTypeName'] != null) {
		data.businessTypeName = json['businessTypeName']?.toString();
	}
	if (json['createdTime'] != null) {
		data.createdTime = json['createdTime']?.toString();
	}
	if (json['id'] != null) {
		data.id = json['id']?.toInt();
	}
	if (json['address'] != null) {
		data.address = json['address'];
	}
	if (json['subjectNo'] != null) {
		data.subjectNo = json['subjectNo']?.toString();
	}
	if (json['inMarketName'] != null) {
		data.inMarketName = json['inMarketName'];
	}
	if (json['certificationId'] != null) {
		data.certificationId = json['certificationId']?.toInt();
	}
	if (json['operationName'] != null) {
		data.operationName = json['operationName'];
	}
	if (json['stall'] != null) {
		data.stall = json['stall'];
	}
	if (json['businessTypeId'] != null) {
		data.businessTypeId = json['businessTypeId']?.toInt();
	}
	if (json['certification'] != null) {
		data.certification = json['certification'];
	}
	if (json['enterPris_flutter_eName'] != null) {
		data.enterPris_flutter_eName = json['enterPris_flutter_eName'];
	}
	if (json['filedMarketNo'] != null) {
		data.filedMarketNo = json['filedMarketNo']?.toString();
	}
	if (json['deleted'] != null) {
		data.deleted = json['deleted'];
	}
	if (json['phone'] != null) {
		data.phone = json['phone']?.toString();
	}
	if (json['name'] != null) {
		data.name = json['name']?.toString();
	}
	if (json['auditStatus'] != null) {
		data.auditStatus = json['auditStatus']?.toInt();
	}
	if (json['inMarketNo'] != null) {
		data.inMarketNo = json['inMarketNo'];
	}
	if (json['businessType'] != null) {
		data.businessType = json['businessType'];
	}
	if (json['account'] != null) {
		data.account = json['account'];
	}
	return data;
}

Map<String, dynamic> personinformationResponseConsumerToJson(PersoninformationResponseConsumer entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['modifiedTime'] = entity.modifiedTime;
	data['creatorId'] = entity.creatorId;
	data['modifierId'] = entity.modifierId;
	data['remark'] = entity.remark;
	data['type'] = entity.type;
	data['filedDate'] = entity.filedDate;
	data['marketId'] = entity.marketId;
	data['number'] = entity.number;
	data['filedMarketName'] = entity.filedMarketName;
	data['businessTypeName'] = entity.businessTypeName;
	data['createdTime'] = entity.createdTime;
	data['id'] = entity.id;
	data['address'] = entity.address;
	data['subjectNo'] = entity.subjectNo;
	data['inMarketName'] = entity.inMarketName;
	data['certificationId'] = entity.certificationId;
	data['operationName'] = entity.operationName;
	data['stall'] = entity.stall;
	data['businessTypeId'] = entity.businessTypeId;
	data['certification'] = entity.certification;
	data['enterPris_flutter_eName'] = entity.enterPris_flutter_eName;
	data['filedMarketNo'] = entity.filedMarketNo;
	data['deleted'] = entity.deleted;
	data['phone'] = entity.phone;
	data['name'] = entity.name;
	data['auditStatus'] = entity.auditStatus;
	data['inMarketNo'] = entity.inMarketNo;
	data['businessType'] = entity.businessType;
	data['account'] = entity.account;
	return data;
}

personinformationResponseCertificationFromJson(PersoninformationResponseCertification data, Map<String, dynamic> json) {
	if (json['modifiedTime'] != null) {
		data.modifiedTime = json['modifiedTime']?.toString();
	}
	if (json['licenseNo'] != null) {
		data.licenseNo = json['licenseNo'];
	}
	if (json['deleted'] != null) {
		data.deleted = json['deleted'];
	}
	if (json['credentials'] != null) {
		data.credentials = json['credentials'];
	}
	if (json['idCardNo'] != null) {
		data.idCardNo = json['idCardNo'];
	}
	if (json['legalPerson'] != null) {
		data.legalPerson = json['legalPerson'];
	}
	if (json['creatorId'] != null) {
		data.creatorId = json['creatorId'];
	}
	if (json['modifierId'] != null) {
		data.modifierId = json['modifierId'];
	}
	if (json['createdTime'] != null) {
		data.createdTime = json['createdTime']?.toString();
	}
	if (json['id'] != null) {
		data.id = json['id']?.toInt();
	}
	if (json['type'] != null) {
		data.type = json['type']?.toInt();
	}
	if (json['marketId'] != null) {
		data.marketId = json['marketId']?.toInt();
	}
	return data;
}

Map<String, dynamic> personinformationResponseCertificationToJson(PersoninformationResponseCertification entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['modifiedTime'] = entity.modifiedTime;
	data['licenseNo'] = entity.licenseNo;
	data['deleted'] = entity.deleted;
	data['credentials'] = entity.credentials;
	data['idCardNo'] = entity.idCardNo;
	data['legalPerson'] = entity.legalPerson;
	data['creatorId'] = entity.creatorId;
	data['modifierId'] = entity.modifierId;
	data['createdTime'] = entity.createdTime;
	data['id'] = entity.id;
	data['type'] = entity.type;
	data['marketId'] = entity.marketId;
	return data;
}